import React from 'react'
import { useEmberboxStore } from '../../hooks/store'


const Items = () => {


    return <>
        <div className='w-full h-[4.36rem] bg-[#F8F7FF] rounded-2xl relative border-2 border-rose-600 border-[#3734a9] my-2'>
            <div className='absolite p-4 inset-x-0 inset-y-0'>
                <div className='text-[1rem] text-[#000]'>挂号收费处</div>
                <div className='text-[#000]'><span className='text-[#000]'>急诊住院楼</span> - <span className='text-[#3734a9] font-bold'>F1</span></div>
            </div>
        </div>
    </>
}


const Bottombar = () => {

    const store: any = useEmberboxStore()
    return <>
        {/* h-[5.36rem] */}
        <div className='w-full h-10 flex justify-around items-end bg-[#f000] z-10'>

            <div className='flex justify-center items-center '>
                <span>报错</span>
                <img className='w-[1.14rem] h-[1.14rem]' src="/bottombar/报错@2x.png" alt="" />
            </div>
            <div>
                <img className='w-[5.29rem] h-[5.29rem] select-none'
                    onClick={() => store.setState('Navigiting')}
                    src="/bottombar/飞机@2x.png" alt="" />
            </div>
            <div className='flex justify-center items-center '>
                <span>分享</span>
                <img className='w-[1.14rem] h-[1.14rem]' src="/bottombar/分享@2x.png" alt="" />
            </div>
        </div>

    </>
}

const index = () => {
    return (
        // 选择导航记录
        <div className='bg-prime color-prime min-h-0  bg-[#fff] rounded-t-[1.14rem] fixed  inset-x-0 bottom-0 px-4 py-2 flex flex-col justify-end  select-none'>
            <div className='text-center color-second border-b-[0.1rem]'>挂号收费（两条记录）</div>
            <div className='max-h-[14rem] py-2 overflow-y-auto'>
                <Items />
                <Items />
                <Items />
                <Items />
                <Items />
                <Items />
            </div>

            <Bottombar />
        </div>
    )
}

export default index